<?php	$this->load->helper('form');?>
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%; height: 75px; background-color: white;">
	<tbody>
		<tr>
			<td class="horizontalHospitalLogo">
				<image src="<?php echo base_url().'/images/comp_logo.jpg';?>"/>
			</td>
			<td rowspan="2" class="hospitalLogo">
				<table cellspacing="0" cellpadding="0" border="0" background="" style="width: 100%; height: 100%;">
					<tbody>
						<tr height="60%">
							<td class="hospitalName">
								<?php echo COMPANY_NAME.' Web Portal';?>
							</td>
						</tr>
					</tbody>
				</table>
			</td>
			<td valign="top" rowspan="2">
				<table cellspacing="0" cellpadding="0">
					<tbody>
						<tr>
							<td class="loginRow">
								<?php
									if ($this->ion_auth->logged_in())
									{
										$user = $this->ion_auth->get_user(); 
										echo '<a href="'.site_url().'/auth/logout" >Logout:</a> '.$user->first_name.' '.$user->last_name;
									}
								?>
							</td>
						</tr>
						<tr>
							<td class="loginRow">
								<?php
									if ($this->ion_auth->is_admin())
									{
										$user = $this->ion_auth->get_user();
										$facility_list = $this->master_view_functions->get_user_facility_list();
										echo form_dropdown('facility_id', $facility_list, $user->current_facility_id, 'id="_facilityList" class = "admin-dropdown"'); 	
									}
									elseif ($this->ion_auth->logged_in())
									{
										echo $this->master_view_functions->get_user_facility_name();;
									}
								?>
							</td>
						</tr>
						<tr>
							<td class="fillerRow">&nbsp;</td>
						</tr>
					</tbody>
				</table>
			</td>
		</tr>
	</tbody>
</table>


	
